<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <!-- 增加卷开始 -->
			<div id="dialog-message" style="min-height:500px;">  
				 	 <table id="register_from">
							<tr style="display:none;">
				 	 			<td> </td>
				 	 			<td>
				 	 				 <input type="hidden" id="table_id" value="${param.table_id}">
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>卷名称：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<input class="form-control" id="name"  value="${param.name}" name="name"  require='true'  meth="notNull,isSpace" maxlength="20"  title="名称不能为空，不能输入特殊字符"  type="text"/> 
									</div> 
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>类型：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<select class="form-control" id="type" name="type" style="width:150px;"> 
											<option value="0">规定时间</option> 
											<option value="1">固定时间</option>
										</select>

									</div> 
				 	 			</td>
				 	 		</tr>
				 	 		
				 	 		<tr>
				 	 			<td>所属人：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<input class="form-control" type="text" id="userName" name="userName" value="${sessionScope.sysUser.userName}" disabled="disabled"/> 
									</div> 
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>开始日期：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<input class="form-control date-picker"  value="${param.showStartTime.substring(0,10)}" id="showStartTime" type="text" data-date-format="yyyy-mm-dd" />
										<span class="input-group-addon">
											<i class="icon-calendar bigger-110"></i>
										</span>
									</div>
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>开始时间：</td>
				 	 			<td>
				 	 				<div class="input-group bootstrap-timepicker">
										<input id="timepicker1" type="text" class="form-control" value="${param.showStartTime.substring(10,19)}" />
										<span class="input-group-addon">
											<i class="icon-time bigger-110"></i>
										</span>
									</div>
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>结束日期：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<input class="form-control date-picker" value="${param.showEndTime.substring(0,10)}" id="showEndTime" type="text" data-date-format="yyyy-mm-dd" />
										<span class="input-group-addon">
											<i class="icon-calendar bigger-110"></i>
										</span>
									</div>
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>结束时间：</td>
				 	 			<td>
				 	 				<div class="input-group bootstrap-timepicker">
										<input id="timepicker2" type="text" class="form-control" value="${param.showEndTime.substring(10,19)}" />
										<span class="input-group-addon">
											<i class="icon-time bigger-110"></i>
										</span>
									</div>
				 	 			</td>
				 	 		</tr>
				 	 		<tr>
				 	 			<td>描述：</td>
				 	 			<td>
				 	 				<div class="input-group">
										<textarea id="note" name="note" maxlength="300" class="autosize-transition form-control">${param.note}</textarea>
									</div> 
				 	 			</td>
				 	 		</tr>
				 	 </table>		 
			</div>
			<!-- 增加卷结束-->
<script>
(function(){
	//增加卷
	 function addHomeWork(contrl){
		var a =$("#register_from").hzValidate("init");  
		if(a==false){
			return;
		}else{ 
			var object = OAajaxSubmit("register_from");  
			var url ="${pageContext.request.contextPath}/edu/sys_TestPaperAction.do?method=addTestPaper";
				$.ajax({
				   type: "POST",
				   url: url,
				   data: object,
				   dataType:'json',
				   success: function(msg){
					   alert(msg.message);
					  if(msg.code=="1"){
						    $(contrl).dialog('destroy'); 
							$("#user_include").html("");
							window.homeWork.loadTestPaper(null,{});
					  }
				   }
				});
			
		}
	 };
	 $(function(){ 
		 if("${param.sex}"!=""){
			 for(var i=0;i<$("#sex").find("option").length;i++){
				 if($("#sex").find("option")[i].value=="${param.sex}"){
					 $("#sex").find("option")[i].selected=true;
				 }
			 }
		 };
		 $("#showStartTime").datepicker({
				showOtherMonths: true, 
				selectOtherMonths: false,
				monthNames: [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" ],
				dateFormat: "yy-mm-dd"
		 });
		 $('#timepicker1').timepicker({
				minuteStep: 1,
				showSeconds: true,
				showMeridian: false
		  });
		 $('#timepicker2').timepicker({
				minuteStep: 1,
				showSeconds: true,
				showMeridian: false
		  });
 
		 $("#showEndTime").datepicker({
				showOtherMonths: true, 
				selectOtherMonths: false,
				monthNames: [ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月" ],
				dateFormat: "yy-mm-dd"
		 });
	 });
	 window.homeWorkAdd={};
	 window.homeWorkAdd.addHomeWork=addHomeWork;
	
})();
</script>